package com.gakj.truck.third.core.utils;

import java.util.regex.Pattern;

/**
 * Created by duronghong on 2016/11/10.
 */
public class CheckUtils {

    public static boolean checkLicence(String licence){
//        String pattern = "^[\u4e00-\u9fa5]{1}[A-Za-z]{1}[A-Za-z0-9]{4,4}[\u4e00-\u9fa5A-Za-z0-9]{1}$";
        String pattern =  "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[警京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{0,1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$";
        Pattern p = Pattern.compile(pattern);
        return p.matcher(licence).matches();
    }
}
